﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Denting
{
    public class Element
    {
        public int ElementID { get; set; }
        public int Node_1 { get; set; }
        public int Node_2 { get; set; }
        public int Node_3 { get; set; }
        public int Node_4 { get; set; }
        public int Node_5 { get; set; }
        public int Node_6 { get; set; }
        public int Node_7 { get; set; }
        public int Node_8 { get; set; }
        public int Node_9 { get; set; }
        public bool IsElementTriangle { get; set; }

        public Element(int id,int a, int b, int c)
        {
            ElementID = id;
            Node_1 = a;
            Node_2 = b;
            Node_3 = c;
            Node_4 = 0;
            Node_5 = 0;
            Node_6 = 0;
            Node_7 = 0;
            Node_8 = 0;
            Node_9 = 0;
            IsElementTriangle = true;

        }
        public Element(int id,int a, int b, int c, int d)
            : this(id, a, b, c)
        {
            Node_4 = d;
            IsElementTriangle = false;
        }
        public Element()
            : this(0, 0, 0, 0, 0)
        {

        }
        public void Show()
        {
            Console.WriteLine("ElementID:{0}", ElementID);
            Console.WriteLine("Node_1:{0}", Node_1);
            Console.WriteLine("Node_2:{0}", Node_2);
            Console.WriteLine("Node_3:{0}", Node_3);
            Console.WriteLine("Node_4:{0}", Node_4);
            Console.WriteLine("Node_5:{0}", Node_5);
            Console.WriteLine("Node_6:{0}", Node_6);
            Console.WriteLine("Node_7:{0}", Node_7);
            Console.WriteLine("Node_8:{0}", Node_8);
            Console.WriteLine("Node_9:{0}", Node_9);
            Console.WriteLine("IsElementTriangle:{0}", IsElementTriangle);

        }
        public Element clone()
        {
            Element tempElement = new Element();
            tempElement.ElementID = this.ElementID;
            tempElement.Node_1 = this.Node_1;
            tempElement.Node_2 = this.Node_2;
            tempElement.Node_3 = this.Node_3;
            tempElement.Node_4 = this.Node_4;
            tempElement.Node_5 = this.Node_5;
            tempElement.Node_6 = this.Node_6;
            tempElement.Node_7 = this.Node_7;
            tempElement.Node_8 = this.Node_8;
            tempElement.Node_9 = this.Node_9;
            tempElement.IsElementTriangle = this.IsElementTriangle;
            return tempElement;
        }
    }
}
